package com.ask.server.practice;

import com.ask.common.enumeration.TrafficLight;

public class EnumExample {
    public static void main(String[] args) {
        TrafficLight light = TrafficLight.RED;
        if (light == TrafficLight.RED) {
            System.out.println("The light is Red");
        }

        for (TrafficLight l1 : TrafficLight.values()) {
            System.out.println(l1);
        }

        System.out.println(TrafficLight.valueOf("RED"));
    }
}
